<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>对象的创建使用-构造函数模式</title>
		<script type="text/javascript">
			//定义一个构造方法
			function Student(name,sex,age){
				this.name = name;
				this.sex = sex;
				this.age = age;
			}
			
			//创建学生对象并赋值
			let stu1 = new Student("张三","男",18);
			let stu2 = new Student("李四","男",18);
			let stu3 = new Student("王五","男",18);
			
			console.log(stu1);
			console.log(stu2);
			console.log(stu3);
		</script>
	</head>
	<body>
	</body>
</html>